package kd.comt.plugin;

import kd.bos.form.control.RichTextEditor;
import kd.bos.form.events.BeforeDoOperationEventArgs;
import kd.bos.form.operate.FormOperate;
import kd.bos.form.plugin.AbstractFormPlugin;
import java.util.EventObject;

public class ggxx extends AbstractFormPlugin{
	@Override
	public void beforeDoOperation(BeforeDoOperationEventArgs args){
		super.beforeDoOperation(args);
		FormOperate operate=(FormOperate)args.getSource();
		String key = operate.getOperateKey();
		if(key.equals("save")) {
			RichTextEditor edit =this.getView().getControl("bpgx_fwb1");
			this.getModel().setValue("bpgx_dwb_tag", edit.getText());

		}

	}
	@Override
	public void afterBindData(EventObject e) {
		// TODO Auto-generated method stub
		super.afterBindData(e);
		RichTextEditor edit = this.getView().getControl("bpgx_fwb2");
		edit.setText((String)this.getModel().getValue("bpgx_dwb_tag"));
		
		RichTextEditor edit2 = this.getView().getControl("bpgx_fwb1");
		edit2.setText((String)this.getModel().getValue("bpgx_dwb_tag"));
	}
   
}
